package framework.rpc;

import com.caucho.hessian.server.HessianServlet;

import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;

@WebServlet("/hessian")
public class HelloServiceImpl extends HessianServlet implements HelloService {

    private static final long serialVersionUID = -3537274030227675984L;

    @Override
    public String helloWorld(String message) {
        return "Hello, " + message;
    }

    @Override
    public User getMyInfo(User user) {
        if (null == user) {
            return new User();
        }

        user.setAge(99);
        return user;
    }
}
